// run: $exec < input
// opt: 0
// flag: -g
#include <iostream>
#include <functional>
#include <queue>
#include <stack>
#include <cctype>
#include <string>

std::string s;
int n, left;
int p, len;
int pow3[14];

void skip_space(int & p) { for (; s[p] == ' '; p++); }

int get_number(int & p)
{
	skip_space(p);
	int ret = 0;
	for (; std::isdigit(s[p]); p++)
		ret = ret * 10 + s[p] - '0';
	return ret;
}

void skip_one(int & p)
{
	skip_space(p);
	p++;
}

bool is_lp(int & p)
{
	skip_space(p);
	if (p >= n) return false;
	return s[p] == '(';
}

bool is_rp(int & p)
{
	skip_space(p);
	if (p >= n) return false;
	return s[p] == ')';
}

std::vector<int> right_match[20];
int number[20];
int opt[20]; // 0: +,   1: -,   2: *

int calc(int l, int r)
{
	if (l == r) return number[l];
	int ret = number[l];
	for (int i = l + 1; i <= r; i++) {
		int ti = i;
		int tmp = number[i];
		if (right_match[i].size()) {
			int tr = right_match[i][right_match[i].size() - 1];
			right_match[i].erase(right_match[i].end() - 1);
			tmp = calc(i, tr);
			right_match[i].push_back(tr);
			i = tr;
		}
		if (opt[ti - 1] == 0) ret += tmp;
		else if (opt[ti - 1] == 1) ret -= tmp;
		else ret *= tmp;
	}
	return ret;
}

void print()
{
	std::cout << left << '=';
	std::priority_queue<int, std::vector<int>, std::greater<int> > rp;
	for (int i = 0; i < len; i++) {
		if (right_match[i].size()) {
			for (int j = 0; j < (int)right_match[i].size(); j++) {
				std::cout << '(';
				rp.push(right_match[i][j]);
			}
		}
		std::cout << number[i];
		while (!rp.empty() && rp.top() == i) {
			std::cout << ')';
			rp.pop();
		}
		if (i < len - 1) {
			if (opt[i] == 0) std::cout << '+';
			else if (opt[i] == 1) std::cout << '-';
			else std::cout << '*';
		}
	}
	std::cout << '\n';
}

int main()
{
	std::ios::sync_with_stdio(false);
	pow3[0] = 1;
	for (int i = 1; i < 14; i++) pow3[i] = 3 * pow3[i - 1];
	for (int ti = 1; std::getline(std::cin, s) && s != "0"; ti++) {
		n = s.size();
		p = 0;
		for (int i = 0; i < 20; i++) right_match[i].clear();
		std::cout << "Equation #" << ti << ":\n";
		left = get_number(p);
		skip_one(p);
		std::stack<int> lp;
		len = 0;
		for (; ; ) {
			if (is_lp(p)) {
				while (is_lp(p)) {
					lp.push(len);
					skip_one(p);
				}
			}
			skip_space(p);
			if (p >= n) break;
			number[len++] = get_number(p);

			if (is_rp(p)) {
				while (is_rp(p)) {
					int now = lp.top();
					lp.pop();
					skip_one(p);
					right_match[now].push_back(len - 1);
				}
			}
		}

		bool ok = false;
		for (int i = 0; i < pow3[len - 1]; i++) {
			int t = i;
			for (int j = 0; j < len - 1; j++, t /= 3) opt[j] = t % 3;
			int tmp = calc(0, len - 1);
			if (tmp == left) {
				print();
				ok = true;
				break;
			}
		}
		if (!ok) std::cout << "Impossible\n";
		std::cout << '\n';
	}
}

